package com.ease.map.style {
   import com.ease.map.common.enum.AlignmentEnum;
   import com.ease.map.style.AbstractStyle;
   import com.ease.map.style.IStyle;

   /**
    * 文本样式类
    */
   public class LabelStyle extends AbstractStyle {
      /**字体名称*/
      public var font:String = "宋体";
      /**字体大小*/
      public var size:Array = [12];
      /**字体颜色*/
      public var color:int = 0;
      /**对齐方式*/
      public var alignment:int = AlignmentEnum.CENTER;
      /**旋转角度*/
      public var rotation:String = "0.0";
      /**透明度*/
      public var alpha:Number = 1.0;
      /**标注X方向偏移量*/
      public var xoffset:Number = 0;
      /**标注y方向偏移量*/
      public var yoffset:Number = 0;

      public function LabelStyle() {
         super();
      }

      /**
       * 克隆
       */
      override public function clone():IStyle {
         var s:LabelStyle = new LabelStyle();
         s.color = this.color;
         s.font = this.font;
         s.alignment = this.alignment;
         s.rotation = this.rotation;
         s.size = this.size;
         s.alpha = this.alpha;
         s.xoffset = this.xoffset;
         s.yoffset = this.yoffset;
         return s;
      }

      public static function getDefaultStyle():LabelStyle {
         var style:LabelStyle = new LabelStyle();
         style.color = 0x000000;
         style.font = "宋体";
         style.size = Array[12];
         return style;

      }

   }
}